@echo off
set PATH=D:/MyWork/db/maven/apache-maven-frank/bin;%PATH%

@REM 模块依赖
set MODULE_DEPENDENT_GROUPID=cn.frank.framework.caesar-archetype
set MODULE_DEPENDENT_ARTIFACTID=caesar-archetype-module-archetype-17
set MODULE_DEPENDENT_VERSION=1.0.0

@REM 模块配置
set MODULE_CREATE_GROUP_ID=cn.frank.framework.caesar-ai
set MODULE_CREATE_ARTIFACT_ID=caesar-module-ai-qwen
set MODULE_CREATE_VERSION=1.0.0
set MODULE_CREATE_PACKAGE=cn.frank.framework.caesar.module.ai.qwen
set MODULE_CREATE_MODULE=Qwen
set MODULE_CREATE_PORT=25081

@REM echo "-------------------------------"
@REM echo PATH=%PATH%
@REM echo GROUPID=%GROUPID%
@REM echo VERSION=%VERSION%
@REM echo ARTIFACTID=%ARTIFACTID%
@REM echo PACKAGE=%PACKAGE%
@REM echo "-------------------------------"

:: 检查 caesar-starter-test 是否存在
@REM if exist "caesar-starter\caesar-starter-test" (
@REM     echo Directory 'caesar-starter-test' already exists.
@REM     set /p choice=Do you want to delete it? [Y/N]
@REM     if /I "%choice%" == "Y" (
@REM         echo Deleting directory 'caesar-starter-test'...
@REM         rd /s /q "caesar-starter\caesar-starter-test"
@REM     )
@REM )

cd ./
echo "this menu:%cd%" && pause
call mvn archetype:generate -X -DinteractiveMode=true -DarchetypeCatalog=local -DinteractiveMode=false ^
    -DarchetypeGroupId=%MODULE_DEPENDENT_GROUPID% -DarchetypeArtifactId=%MODULE_DEPENDENT_ARTIFACTID% -DarchetypeVersion=%MODULE_DEPENDENT_VERSION% ^
    -DgroupId=%MODULE_CREATE_GROUP_ID% ^
    -DartifactId=%MODULE_CREATE_ARTIFACT_ID% ^
    -Dversion=%MODULE_CREATE_VERSION% ^
    -Dpackage=%MODULE_CREATE_PACKAGE% ^
    -DmoduleName=%MODULE_CREATE_MODULE% ^
    -DmodulePort=%MODULE_CREATE_PORT%

pause

